cmake_minimum_required(VERSION 3.0)
set(CUDA_TOOLKIT_ROOT_DIR C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0)
SET(EXECUTABLE_NAME test_mnist_ANN)
option(CORE_USE_CUDA "Use CUDA to speed up certain parts of the code." ON)

find_package(CUDA REQUIRED)
add_definitions(-DUSE_CUDA)

include_directories(E:/eigen3.5)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(OpenCV REQUIRED)
include_directories(${PROJECT_SOURCE_DIR}/src/include)
message(${CUDA_INCLUDE_DIRS})
set(DEPENDIES
        ${PROJECT_SOURCE_DIR}/src/include/layers/ANNLayer.h
#        ${PROJECT_SOURCE_DIR}/src/sources/layers/ANNLayer.cpp
        ${PROJECT_SOURCE_DIR}/src/sources/layers/ANNLayer.cu
        ${PROJECT_SOURCE_DIR}/src/include/utils.h
        ${PROJECT_SOURCE_DIR}/src/include/utils.h
        ${PROJECT_SOURCE_DIR}/src/sources/utils.cu

        ${PROJECT_SOURCE_DIR}/src/include/activate_functions/sigmod.h
        ${PROJECT_SOURCE_DIR}/src/sources/activate_functions/sigmod.cpp
        ${PROJECT_SOURCE_DIR}/src/sources/activate_functions/sigmod.lnf
        ${PROJECT_SOURCE_DIR}/src/include/logic_functions/Loss.h
        ${PROJECT_SOURCE_DIR}/src/sources/logic_functions/Loss.cpp
        ${PROJECT_SOURCE_DIR}/src/sources/logic_functions/Loss.lnf
        )
cuda_add_executable(${EXECUTABLE_NAME}
        ${PROJECT_SOURCE_DIR}/test/test_mnist/test_ANN_mnist.cpp
        ${DEPENDIES}
        )

target_link_libraries(${EXECUTABLE_NAME} ${OpenCV_LIBS}  ${CUDA_LIBRARIES})

set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_EXTENSIONS OFF)
target_include_directories(${EXECUTABLE_NAME} PUBLIC E:/eigen3.5)
